<!DOCTYPE html>
<head>
  <script>
    // Fallback to Date.now() if timeOrigin is not supported.
    const TIME_ORIGIN = window.performance.timeOrigin || Date.now();
  </script>

  <meta charset="utf-8">
  <%/* trusted-types won't work with webpack-dev-server because webpack-dev-server uses `eval` */%>
  <% if (!webpackConfig.devServer) { %>
    <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
  <% } %>

  <title>LUCI Milo</title>
  <link id="favicon" href="/static/common/favicon/milo-32.png" rel="icon">
  <link href="/ui/styles/style.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet">

  <!-- Google Analytics -->
  <script>
    const ANALYTICS_URL = 'https://www.google-analytics.com/analytics.js';
    const analyticUrl = window
      .trustedTypes?.createPolicy('analytics-js-static', { createScriptURL: (_) => ANALYTICS_URL })
      .createScriptURL('') || ANALYTICS_URL;
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script',analyticUrl,'ga');

    const trackingId = ['luci-milo.appspot.com', 'ci.chromium.org'].includes(window.location.hostname)
      ? 'UA-55762617-24' // luci-milo
      : 'UA-55762617-26'; // luci-milo-dev
    ga('create', trackingId, 'auto');
    ga('send', 'pageview');
  </script>
  <!-- End Google Analytics -->

  <script src="/configs.js"></script>
  <script>
    const VISIT_ID = Math.random().toString();
  </script>
</head>
<body>
  <div id="app-root"></div>
</body>
